<template>
  <div class="container">
    <div class="header">
      <span @click="goBack">《《《 返回首页</span>
    </div>
    <div v-if="error.statusCode === 404" class="page">
      <nuxt-link to="/">
        <img src="http://img.binlive.cn/upload/1525013647902" alt="">
      </nuxt-link>
    </div>
    <div v-else class="page">
      <nuxt-link to="/">
        <img src="http://img.binlive.cn/upload/1525016935287" alt="">
      </nuxt-link>
    </div>
  </div>
</template>

<script>
export default {
  // eslint-disable-next-line vue/require-prop-types
  props: ['error'],
  mounted () {
    this.$store.commit('player/setShowPlayerUi', false)
  },
  methods: {
    goBack () {
      // eslint-disable-next-line no-console
      this.$router.back(-1)
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
  .header {
    width: 100%;
    height: 48px;
    line-height: 48px;
    margin:0 auto;
    border-bottom: 1PX solid rgba(0,0,0,.1);
  }
  .page img{
    width: 80%;
    padding-top: 60px;
    display: block;
    margin:0 auto;
  }
}
</style>
